package com.googlecode.tracey.ui.core;

import java.util.Map;

public class TraceyMessageFromMap implements TraceyMessage {
    private Map<String, Object> map;

    public TraceyMessageFromMap(Map<String, Object> map) {
        this.map = map;
    }

    @Override
    public String from() {
        return map.get("from").toString();
    }

    @Override
    public String to() {
        return map.get("to").toString();
    }

    @Override
    public String messageId() {
        return map.get("messageId").toString();
    }

    @Override
    public String name() {
        return map.get("name").toString();
    }
}
